<?php
//生产配置文件

return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'Payview',

    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
        'application.models.forms.*',

        'application.helper.*',
    ),

    'modules'=>array(
        // uncomment the following to enable the Gii tool

    ),

    // application components
    'components'=>array(
        'user'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
            'loginUrl'=>array('user/login'),
            'class' => 'WebUser'
        ),
        'wxUser'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
            'loginUrl'=>array('user/login'),
            'class' => 'WxWebUser'
        ),
        'aliUser'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
            'loginUrl'=>array('user/login'),
            'class' => 'AliWebUser'
        ),
        'urlManager'=>array(
            'urlFormat'=>'path',
            'showScriptName'=>false,
            'caseSensitive'=>false,
            'rules'=>array(
                '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
                '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
            ),
        ),

        'db'=>array(
            'connectionString' => 'mysql:host=172.16.13.142;dbname=payview',//172.16.13.142
            'emulatePrepare' => true,
            'username' => 'marcus',
            'password' => 'zjYinZhun@asdhuez#4@(_9',
            'charset' => 'utf8',
        ),

        'redis' => array(
            "class" => "ext.redis.ARedisConnection",
            "hostname" => "172.16.13.142",
            "port" => 6379,
            "database" => 1,
            "password" => 'huikewk',
            "prefix" => "Payview.redis:"
        ),
        /********************************************************************/


        'WxInterface' => array(
            'class' => 'application.components.WxInterface',
        ),

        'NewretailWxInterface' => array(
            'class' => 'application.components.NewretailWxInterface',
        ),

        'NewretailAliInterface' => array(
            'class' => 'application.components.NewretailAliInterface',
        ),

        'errorHandler'=>array(
            // use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning, info',
                    'categories'=> 'orders.*',
                    'logFile'=> 'orders.log',
                ),
            ),
        ),
    ),

    // using Yii::app()->params['paramName']
    'params' => array(
        'FRONTEND_BASEURL' => 'http://pv.visastandards.com/',

        'allpay' => array(
            'api_url' => 'https://pay.visastandards.com:9902/gclients',
            'token' => '30d6eba54ea9965cb5079a6181e56fcc',
            'notify_url' => 'http://pv.visastandards.com/pay/wxcallback',
            'sub_appid' => 'wx6c318bb68592a6e2',
        ),
        'risk' => array(
            'warning_value' => 10,
            'risk_value' => 20,
            'limit_times' => 3
        ),

        'QR_BASEURL' => 'http://pv.visastandards.com/merchants_mpqrcode/',

        'get_qrcode'=>'http://s.visastandards.com/qrcode/get',
        'get_isdiscount'=>'http://s.visastandards.com/qrcode/discount',
        'message'=>'http://pv.visastandards.com/merchant/message',

        'rqcode_src'=>'/resources/frontend/images/yaoqianba.png',
        'get_cgi_token'=>'http://'.$_SERVER['SERVER_NAME'],
        'trade_template_id'=>'4oSv0NgAoQwEQof5OwEKqzQpGFHtMRpFBgXj24u8yZ4',
        'star_template_id'=>'xbc8yalt3MQW5lD3GeeAKAcjwhg6_5NiD1hNNUOiCDU',


        //加星
        'add_start_url'=>'http://mumu.visastandards.com/api/star/add',
        'star_index_url'=>'http://mumu.visastandards.com',

        //主推微信公众号map_info id
        'main_mapinfo_id' => '16',

        'newretail' => array(
            'allpay' => array(
                'allpay_merchant' => '86570004',
                'api_url' => 'https://pay.visastandards.com:9902/gclients',
                'token' => '30d6eba54ea9965cb5079a6181e56fcc',
                'wx_notify_url' => 'http://pv.visastandards.com/wxpay/wxcallback',
                'ali_notify_url' => 'http://pv.visastandards.com/alipay/alicallback',
                'sub_appid' => 'wx6c318bb68592a6e2',
            ),
            'test_alipay_url' => 'http://pv.visastandards.com/alipay/jspay',
            'test_wxpay_url' => 'http://pv.visastandards.com/wxpay/jspay',
            'wxconfig' => array(
                'appid' => 'wx6c318bb68592a6e2',
                'secret' => '6d51d7d32b4c77241d2f3ee5c9a9a36f',
            ),
            'aliconfig' => array(
                //网关
                'gatewayUrl'=> "https://openapi.alipay.com/gateway.do",
                'appId'=>'2018091261330250',
                //商户私钥//rsaPrivateKeyFilePath alipayPublicKey rsaPrivateKey alipayrsaPublicKey
                'rsaPrivateKey'=> 'MIIEowIBAAKCAQEA4wESCd+LNnJHQPHvfDbvKXyHGhJ7z5yLR3lUBwtIiTgGm/GgdYqn2utpu0t/A0jrxcOa0BKnN6lZZZUrcPwodVsDYT5XsNMOlp1pCfUFOmGog9bNxRjDMp2Gb02T2NB6rVNbAsTDZJM90xZJUG65Vd0tDw7NM2TEGW9ckEUKFiwOPtN4v1ozfVNZ01axQ3NVEM2bRugl9vvNEYKRZ1eUJeuiP90ies0d8prtiYr3sFqliLTdAEJ1uanFQ18BwY44iXHkuf8jK39gaf5EBlFwRXbI+CunI8FflKI6F7AWmKvnSIaGZOZjh0hNl7wZEKFPP24hYFstGGzTcZ3QczvD5wIDAQABAoIBAQCWIEkbunlI4r741of5cCMvHqoCtiKnpPH/rN/DYNTx2tmUHHJwCekEwRfFxCIVvA4hVkF2Rj/McfUrV0HJkRn4st5DW4WG7a4CMcwbx61TdO6Lcm3XYY8GVGNqDLYwd4AKTMwtwo8uXqpOhbiqtu9fN8zq3nEbAhMmdx2SU/Zdvjo5BaT3snHQIQ5kWHuodfq8/gBrI1w/IlJ3oLZjZPI/ZeEL3LKnG1iAr0ZxzWH/FFpovPbrhfArBnN+NETbZOKXpcRrgWn4FssOfJi/GhBFhEnwk5EEMq+yiaT079RRM8Uo9OS7h/Tjy8YS80AcYbpBKOlv2iu80SiaNy8bRb1RAoGBAPJdvIsn2uQoDF5TfhWUeOQZeHMAVagha4kxerQT3uZLJZhi000c5DGAausKhbJi4jjzv90GLylDfaogLB+5hRlWqcSvrWsoDazoODiLVXn0CxZK93Ny4h17Lm2pf0QnIVq0ic6Iz2cVP5QKbfARcJVtznpB/7EKJiSGvPFnKVbDAoGBAO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HmrVh49Yg9Ld5irkfALKv6EqcH/R4b6azsXWL1QIDAQAB',
                'apiVersion'=> '1.0',
                //签名类型
                'signType'=> 'RSA2',
                'postCharset'=> 'utf-8',
                'format'=> 'json',
            ),
        ),
    ),
);
